#include <cstdio>
#include <cstring>
#include <iostream>
#include <algorithm>
using namespace std;
const int maxn = 1e5+10;
int main()
{
	char s[maxn];
	while(gets(s))
	{
		int flag[30]={0};
		int ans = 0;
		int ss = 0;
		int len = strlen(s);
		for(int i = 0;i<len;i++)
		{
			if(s[i]>='a'&&s[i]<='z') 
			{
				if(flag[s[i]-'a']==0)
				{
					flag[s[i]-'a']=1;
					ans++;
				}
			}
			else if(s[i]>='A'&&s[i]<='Z')
			{
				if(flag[s[i]-'A']==0)
				{
					flag[s[i]-'A']=1;
					ans++;
				}
			}
			else ss++;
		}
		if(ans<=10&&ss<=9) puts("Yes");
		else puts("No");
	}
}
